package gv.trans.dict;

public class FakeDictionary implements Dictionary {

	//The test just contains two languages
	@Override
	public String[][] allTheLanguages() {
		return new String[][]{{"en","English"},{"it","Italiano"}};
	}

	//The test just contains the word: "ciao"
	@Override
	public String[][] languagesForTerm(String term) {
		if(term.equalsIgnoreCase("Ciao")){
			return new String[][]{{"it","Italiano"}};
		}
		return null;
	}

	//The test knows the translation of the word "ciao", nothing else
	@Override
	public boolean exists(String term, String langCode) {
		if(term.equalsIgnoreCase("ciao")&&langCode.equalsIgnoreCase("it")) return true;
		return false;
	}

	@Override
	public String[] translate(String term, String langCode) {
		if(exists(term, langCode))
			return new String[]{"bye", "http://mor90.altervista.org/Image/ciao.h1_1_.jpg"};
		else
			return null;
	}

}
